﻿@{
    ViewBag.Title = "HolMenage";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<script src="~/Scripts/jquery-1.8.2.min.js"></script>
<script>


    /*模糊查询度假信息显示*/
    $(function () {
        $.ajax({
            type: 'get',
            url: '/Astart/ShowShowholiday',
            success: function (d) {
                $(d).each(function (i, obj) {
                    var tr = '<tr><td>' + obj.Holidayid + '</td><td>' + obj.Hoildayimg + '</td><td>' + obj.Hoildaycomdo + '</td><td>' + obj.Hoildayproductid + '</td><td>' + obj.Holidayprice + '</td><td>' + obj.Readnumber + '</td><td>' + obj.Traveldate + '</td><td>' + obj.Travelday + '</td><td>' + obj.Playline + '</td><td>' + obj.Journeytese + '</td><td>' + obj.Coitexplain + '</td><td>' + obj.Ordernotict + '</td><td>' + obj.Visaexplain + '</td><td>' + obj.Refundexplain + '</td><td>' + obj.Elseexplain + '</td><td><a onclick="Hoil_Del(" + obj.Holidayid + ")" href="#">删除</a></td><td><a href="/Astart/Holi_Eidt?id="+ Holidayid +"" >修改</a></td></tr>'
                    $("#tabholiday tbody").append(tr);
                })
            }
        })


        $("#search").click(function () {
            $("#tabholiday tbody").empty();
            var Search = $("#searchpath").val();
            $.ajax({
                type: 'get',
                url: '/Astart/ShowShowholiday',
                data: {
                    Search: Search
                },
                success: function (d) {
                    $(d).each(function (i, obj) {
                        var tr = '<tr><td>' + obj.Holidayid + '</td><td>' + obj.Hoildayimg + '</td><td>' + obj.Hoildaycomdo + '</td><td>' + obj.Hoildayproductid + '</td><td>' + obj.Holidayprice + '</td><td>' + obj.Readnumber + '</td><td>' + obj.Traveldate + '</td><td>' + obj.Travelday + '</td><td>' + obj.Playline + '</td><td>' + obj.Journeytese + '</td><td>' + obj.Coitexplain + '</td><td>' + obj.Ordernotict + '</td><td>' + obj.Visaexplain + '</td><td>' + obj.Refundexplain + '</td><td>' + obj.Elseexplain + '</td><td><a  onclick="Hoil_Del(" + obj.Holidayid + ")" href="#">删除</a></td><td><a href="/Astart/Holi_Eidt?id=" + Holidayid + "" >修改</a></td></tr>'
                        $("#tabholiday tbody").append(tr);
                    })
                }
            })
        })
    })


/* 删除信息*/
    function Hoil_Del(id) {
        $.ajax({
            type: "get",
            url: "/Astart/ShowShowholiday",
            data: { id: id },
            success: function (d) {
                if (d > 0) {
                    alert("删除成功");
                    location.href = '/Astrat/HolMenage'
                }
                else {
                    alert("删除失败");
                    location.href = '/Astrat/HolMenage'
                }
            }
        })
    }








</script>

<ul id="myTab" class="nav nav-tabs" style="margin-top:50px">
    <li class="active">
        <a href="#home" data-toggle="tab">
            度假信息维护
        </a>
    </li>
    <li><a href="#ios" data-toggle="tab">度假评分信息维护</a></li>
    <li><a href="#amuseoneself" data-toggle="tab">游玩人类别信息维护</a></li>
    <li><a href="#journeyreferral" data-toggle="tab">行程信息维护</a></li>
    <li><a href="#journeyday" data-toggle="tab">行程天数信息维护</a></li>
    <li><a href="#Coitexplain" data-toggle="tab">费用信息维护</a></li>
    <li><a href="#Ordernotict" data-toggle="tab">订单信息维护</a></li>
    <li><a href="#Refundexplain" data-toggle="tab">退款说明信息维护</a></li>
    <li><a href="#Elseexplain" data-toggle="tab">补充说明信息维护</a></li>
</ul>
<div id="myTabContent" class="tab-content">
    <div class="tab-pane fade in active" id="home">
        <input class="text" type="text" name="Playline" placeholder="按路线查询" id="searchpath" /><input type="button" name="name" value="查询" id="search" />
        <table id="tabholiday" class="table table-bordered table-condensed table-hover table-responsive table-striped">
            <thead>
                <tr>
                    <th>度假编号</th>
                    <th>度假图片</th>
                    <th>套餐名</th>
                    <th>产品编号</th>
                    <th>度假价格</th>
                    <th>阅览人数</th>
                    <th>出游日期</th>
                    <th>行程天数</th>
                    <th>游玩路线</th>
                    <th>路程特色</th>
                    <th>费用说明</th>
                    <th>订单说明</th>
                    <th>签证说明</th>
                    <th>退款说明</th>
                    <th>温馨提示</th>
                    <th>删除操作</th>
                    <th>修改操作</th>
                </tr>
            </thead>
            <tbody>          
            </tbody>
        </table>
    </div>
    <div class="tab-pane fade" id="ios">
        度假评分信息显示
    </div>
    <div class="tab-pane fade" id="amuseoneself">
        游玩人信息显示
    </div>
    <div class="tab-pane fade" id="journeyreferral">
        行程信息显示
    </div>
    <div class="tab-pane fade" id="Coitexplain">
        费用信息显示
    </div>
    <div class="tab-pane fade" id="Ordernotict">
        订单信息显示
    </div>
    <div class="tab-pane fade" id="Refundexplain">
        退款信息显示
    </div>
    <div class="tab-pane fade" id="Elseexplain">
        补充信息显示
    </div>
</div>
